
**Table 2
xtreg resettled_c l.resettled_c logrefugees uswars waronterror muslim s_rival former_ussr i.year if year>=1990 & reftotal>=1000, re
xtreg resettled_c l.resettled_c logrefugees i.uswars##i.waronterror muslim s_rival former_ussr i.year if year>=1990 & reftotal>=1000, re
xtreg resettled_c l.resettled_c logrefugees uswars i.waronterror##i.muslim  s_rival former_ussr i.year if year>=1990  & reftotal>=1000, re

*Table 2 Logged DV
xtreg logresettled l.logresettled logrefugees uswars waronterror muslim s_rival former_ussr i.year if year>=1990 & reftotal>=1000, re
xtreg logresettled l.logresettled logrefugees i.uswars##i.waronterror muslim s_rival former_ussr i.year if year>=1990 & reftotal>=1000, re
xtreg logresettled l.logresettled logrefugees uswars i.waronterror##i.muslim  s_rival former_ussr i.year if year>=1990 & reftotal>=1000, re

*Figure 3
scatter  resettled_c logrefugees if logrefugees>8 || lfit  resettled_c logrefugees  if logrefugees >8

*Table 3

xtreg resettled_c l.resettled_c logrefugees i.uswars##i.waronterror muslim s_rival former_ussr  if year>=1990 & reftotal>=1000, re

margins i.uswars#i.waronterror,  force

*Table 4. Fixed effects, with and without lag DV

xtreg resettled_c l.resettled_c logrefugees uswars waronterror s_rival year if year>=1990 & reftotal>=1000, fe
xtreg resettled_c logrefugees uswars waronterror s_rival year if year>=1990 & reftotal>=1000, fe

xtreg resettled_c l.resettled_c logrefugees i.uswars##i.waronterror s_rival year if year>=1990 & reftotal>=1000, fe
xtreg resettled_c logrefugees i.uswars##i.waronterror s_rival year if year>=1990 & reftotal>=1000, fe

xtreg resettled_c l.resettled_c logrefugees uswars i.waronterror##i.muslim  s_rival  year if year>=1990  & reftotal>=1000, fe
xtreg resettled_c logrefugees uswars i.waronterror##i.muslim  s_rival  year if year>=1990  & reftotal>=1000, fe

*Table 5. BY ADMINISTRATION


xtreg resettled_c l.resettled_c logrefugees uswars s_rival former_ussr  muslim  if bush1==1 & reftotal>=1000 , re

xtreg resettled_c l.resettled_c logrefugees uswars s_rival former_ussr  muslim if clinton==1 & reftotal>=1000 , re

xtreg resettled_c l.resettled_c  logrefugees uswars s_rival former_ussr  muslim   if bush2==1 & reftotal>=1000 , re

xtreg resettled_c l.resettled_c  logrefugees uswars s_rival former_ussr  muslim  if obama==1 & reftotal>=1000 , re

xtreg resettled_c l.resettled_c logrefugees uswars s_rival former_ussr  muslim   if trump==1 & reftotal>=1000 , re

*Appendix tables

*Count Model
**NBREG

xtnbreg resettled_c  logrefugees uswars waronterror muslim s_rival former_ussr i.year if year>=1990 & reftotal>=1000, irr re

xtnbreg resettled_c  logrefugees i.uswars##i.waronterror muslim s_rival former_ussr i.year if year>=1990 & reftotal>=1000, irr re

xtnbreg  resettled_c  logrefugees uswars i.waronterror##i.muslim  s_rival former_ussr i.year if year>=1990 & reftotal>=1000, irr re


*A-B Estimator
xtabond2 resettled_c l.resettled_c logrefugees uswars waronterror muslim s_rival former_ussr if year>=1990 & reftotal>=1000, gmm(l.resettled_c year)

xtabond2 resettled_c l.resettled_c logrefugees uswars waronterror uswarterror muslim s_rival former_ussr if year>=1990 & reftotal>=1000, gmm(l.resettled_c year)

xtabond2 resettled_c l.resettled_c logrefugees uswars muslim waronterror muslimterror  s_rival former_ussr if year>=1990 & reftotal>=1000, gmm(l.resettled_c year)



*XTIVREG
xtivreg resettled_c (l.resettled_c=l2.resettled_c) logrefugees uswars waronterror  s_rival   if year>=1990 & reftotal>=1000, fd

xtivreg resettled_c (l.resettled_c=l2.resettled_c) logrefugees uswars waronterror uswarterror  s_rival   if year>=1990 & reftotal>=1000, fd

xtivreg resettled_c (l.resettled_c=l2.resettled_c) logrefugees uswars waronterror muslimterror  s_rival   if year>=1990 & reftotal>=1000, fd



*MUNDLAK TEST
mundlak resettled_c  logrefugees uswars waronterror muslim s_rival year if year>=1990 & reftotal>=1000, use(logrefugees uswars waronterror s_rival year) full 

test mean__logrefugees mean__uswars mean__waronterror mean__s_rival mean__year


mundlak resettled_c  logrefugees uswars waronterror uswarterror muslim s_rival year if year>=1990 & reftotal>=1000, use(logrefugees uswars waronterror s_rival year) full 

test mean__logrefugees mean__uswars mean__waronterror mean__s_rival mean__year

